package com.example.demoserver.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.demoserver.entity.InteLog;
import com.example.demoserver.service.InteLogService;
import com.example.demoserver.mapper.InteLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 18364
* @description 针对表【inte_log】的数据库操作Service实现
* @createDate 2024-06-12 11:04:38
*/
@Service
public class InteLogServiceImpl extends ServiceImpl<InteLogMapper, InteLog>
    implements InteLogService{
    @Autowired
    InteLogMapper inteLogMapper;
    @Override
    public List<InteLog> selectByType(Integer type) {
        if(type!=null){
            QueryWrapper<InteLog> queryWrapper=new QueryWrapper<>();
            queryWrapper.eq("logType",type);
            return inteLogMapper.selectList(queryWrapper);
        }
        return inteLogMapper.selectList(null);


    }
}




